Package com.cisco.pt.ipc.system.impl
Class ActivityFileImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.system.impl.NetworkFileImpl
com.cisco.pt.ipc.system.impl.ActivityFileImpl
- All Implemented Interfaces:
IPCObject,ActivityFile,NetworkFile
Information provided by the PKI file:
\class ActivityFile
\brief ActivityFile extends from NetworkFile. It adds the activity layer to the file.
\example appWindow().getActiveFile()
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionActivityFileImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfirmPassword(String hashedPass) Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:doubleInformation provided by the PKI file:doubleInformation provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:doubleInformation provided by the PKI file:doubleInformation provided by the PKI file:doubleInformation provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:getInstruction(int index) Information provided by the PKI file:intInformation provided by the PKI file:getInstructionSource(int index) Information provided by the PKI file:Information provided by the PKI file:intInformation provided by the PKI file:getLastConnectivityTestResultAt(int index) Information provided by the PKI file:Information provided by the PKI file:doubleInformation provided by the PKI file:doubleInformation provided by the PKI file:intInformation provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:voidInformation provided by the PKI file:voidInformation provided by the PKI file:voidInformation provided by the PKI file:voidsetCountDownTime(int ms) Information provided by the PKI file:voidsetDynamicPF(boolean enable) Information provided by the PKI file:voidInformation provided by the PKI file:voidsetTimeElapsed(int ms) Information provided by the PKI file:voidInformation provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.system.impl.NetworkFileImpl
addCustomPduType, addCustomTrafficType, addDefaultScripts, addScript, addScriptDataStore, addScriptFile, getActivityScriptEngine, getFilterSet, getMainNetwork, getMainSimulation, getNetworkDescription, getOptions, getSavedFilename, getScript, getScriptDataStore, getScriptDataStoreIDs, getScriptEngine, getScriptIDs, getUserProfile, getVersion, getWorkspace, hasCustomPduType, hasCustomTrafficType, removeScript, removeScriptDataStore, resetScriptEngine, setNetworkDescriptionMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.system.NetworkFile
addCustomPduType, addCustomTrafficType, addDefaultScripts, addScript, addScriptDataStore, addScriptFile, getActivityScriptEngine, getFilterSet, getMainNetwork, getMainSimulation, getNetworkDescription, getOptions, getSavedFilename, getScript, getScriptDataStore, getScriptDataStoreIDs, getScriptEngine, getScriptIDs, getUserProfile, getVersion, getWorkspace, hasCustomPduType, hasCustomTrafficType, removeScript, removeScriptDataStore, resetScriptEngine, setNetworkDescription
-
Constructor Details
-
ActivityFileImpl
public ActivityFileImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
getInstruction
Information provided by the PKI file:
\brief Returns the evaluated instructions at the specified index. \param index, the instruction page index. -1 returns the current page. \return QString, the evaluated instructions at the specified index.- Specified by:
getInstructionin interfaceActivityFile- Parameters:
index- Takes in a parameter of index- Returns:
- String Returns a String
-
getInstructionSource
Information provided by the PKI file:
\brief Returns the instruction source at the specified index. \param index, the instruction page index. \return QString, the instruction source at the specified index.- Specified by:
getInstructionSourcein interfaceActivityFile- Parameters:
index- Takes in a parameter of index- Returns:
- String Returns a String
-
getCurrentInstructionSource
Information provided by the PKI file:
\brief Returns the current intruction source. \return QString, the current intruction source.- Specified by:
getCurrentInstructionSourcein interfaceActivityFile- Returns:
- String Returns a String
-
getCurrentInstruction
Information provided by the PKI file:
\brief Returns the current evaluated instructions. \return QString, the current evaluated instructions.- Specified by:
getCurrentInstructionin interfaceActivityFile- Returns:
- String Returns a String
-
getInstructionCount
public int getInstructionCount()Information provided by the PKI file:
\brief Returns the number of instruction pages. \return int, the number of instruction pages.- Specified by:
getInstructionCountin interfaceActivityFile- Returns:
- int Returns a int
-
resetActivity
public void resetActivity()Information provided by the PKI file:
\brief Resets the activity.- Specified by:
resetActivityin interfaceActivityFile
-
getPercentageComplete
public double getPercentageComplete()Information provided by the PKI file:
\brief Returns the percentage complete. \return double, the percentage complete.- Specified by:
getPercentageCompletein interfaceActivityFile- Returns:
- double Returns a double
-
getAssessmentItemsCount
public double getAssessmentItemsCount()Information provided by the PKI file:
\brief Returns the total number of assessment items. \return double, the total number of assessment items.- Specified by:
getAssessmentItemsCountin interfaceActivityFile- Returns:
- double Returns a double
-
getCorrectAssessmentItemsCount
public double getCorrectAssessmentItemsCount()Information provided by the PKI file:
\brief Returns the number of correct assessment items. \return double, the number of correct assessment items.- Specified by:
getCorrectAssessmentItemsCountin interfaceActivityFile- Returns:
- double Returns a double
-
getAssessmentScoreCount
public double getAssessmentScoreCount()Information provided by the PKI file:
\brief Returns the total number of assessment scores. \return double, the total number of assessment scores.- Specified by:
getAssessmentScoreCountin interfaceActivityFile- Returns:
- double Returns a double
-
getCorrectAssessmentScoreCount
public double getCorrectAssessmentScoreCount()Information provided by the PKI file:
\brief Returns the number of correct assessment scores. \return double, the number of correct assessment scores.- Specified by:
getCorrectAssessmentScoreCountin interfaceActivityFile- Returns:
- double Returns a double
-
runConnectivityTests
public void runConnectivityTests()Information provided by the PKI file:
\brief Runs the connectivity tests. \remark Use getLastConnectivityTestResultAt() and getLastConnectivityTestCorrectCount() to get results afterwards.- Specified by:
runConnectivityTestsin interfaceActivityFile
-
getConnectivityCount
public double getConnectivityCount()Information provided by the PKI file:
\brief Returns the total number of connectivity tests. \return double, the the total number of connectivity tests.- Specified by:
getConnectivityCountin interfaceActivityFile- Returns:
- double Returns a double
-
getLastConnectivityTestResultAt
Information provided by the PKI file:
\brief Returns the connectivity test result of the last run at index. \remark Valid strings are: - "Correct" - correct - "Incorrect" - incorrect - "Do Not Test" - the connectivity test is not configured to be tested - "" - the connectivity test has not been ran yet \return QString, the connectivity test result at index.- Specified by:
getLastConnectivityTestResultAtin interfaceActivityFile- Parameters:
index- Takes in a parameter of index- Returns:
- String Returns a String
-
getLastConnectivityTestCorrectCount
public int getLastConnectivityTestCorrectCount()Information provided by the PKI file:
\brief Returns the number of correct connectivity tests at the last run. \return int, the number of correct connectivity tests at the last run.- Specified by:
getLastConnectivityTestCorrectCountin interfaceActivityFile- Returns:
- int Returns a int
-
getComparatorTree
Information provided by the PKI file:
\brief Returns a structure representing users progress towards the completion of this activity. \param refresh - refresh results obtained from the most recent call to this method. \param format - defines string representation for the information: "json", "xml", etc. \return int, the number of correct connectivity tests at the last run. \NOT PORTED TO PT DESKTOP QString getActivityProgressInfo(bool refresh, QString format) - PrivActivityWizard; \brief Returns the assessment item tree. \remark This tree defines what assessment items can be and what is currently being assessed by this activity. \return TreeNode, the assessment item tree.- Specified by:
getComparatorTreein interfaceActivityFile- Returns:
- TreeNode Returns a TreeNode
-
getAssessedComparatorTree
Information provided by the PKI file:
\brief Returns the item's assessed assessment item tree. \remark This tree is compared. \return TreeNode, the item's assessed assessment item tree.- Specified by:
getAssessedComparatorTreein interfaceActivityFile- Returns:
- TreeNode Returns a TreeNode
-
getLastAssessedComparatorTree
Information provided by the PKI file:
\brief Returns the item's last assessed assessment item tree. \remark This tree is compared. \return TreeNode, the item's last assessed assessment item tree.- Specified by:
getLastAssessedComparatorTreein interfaceActivityFile- Returns:
- TreeNode Returns a TreeNode
-
nextInstructionPage
Information provided by the PKI file:
\brief Go to the next instruction page and returns the evaluated instruction. \return QString, the evaluated instructions the next page.- Specified by:
nextInstructionPagein interfaceActivityFile- Returns:
- String Returns a String
-
prevInstructionPage
Information provided by the PKI file:
\brief Go to the previous instruction page and returns the evaluated instruction. \return QString, the evaluated instructions the previous page.- Specified by:
prevInstructionPagein interfaceActivityFile- Returns:
- String Returns a String
-
removeInstructionPage
Information provided by the PKI file:
\brief Remove the current instruction page and returns the evaluated instruction. \return QString, the evaluated instructions on the page after the removal.- Specified by:
removeInstructionPagein interfaceActivityFile- Returns:
- String Returns a String
-
insertInstructionPage
Information provided by the PKI file:
\brief Insert an instruction page and returns the current page evaluated instruction. \return QString, the evaluated instructions on the current page.- Specified by:
insertInstructionPagein interfaceActivityFile- Returns:
- String Returns a String
-
getLockingTree
Information provided by the PKI file:
\brief Returns the locking tree. \return LockingTree, the locking tree.- Specified by:
getLockingTreein interfaceActivityFile- Returns:
- LockingTree Returns a LockingTree
-
getInitNetworkFile
Information provided by the PKI file:
\brief Returns the initial network file. \remark The initial network file is the starting network file. It is used to replace the user network on a new activity or when the user resets the activity. \return NetworkFile, the initial network file.- Specified by:
getInitNetworkFilein interfaceActivityFile- Returns:
- NetworkFile Returns a NetworkFile
-
getAnsNetworkFile
Information provided by the PKI file:
\brief Returns the answer network file. \remark The answer network file is used to compare against the user network. \return NetworkFile, the answer network file.- Specified by:
getAnsNetworkFilein interfaceActivityFile- Returns:
- NetworkFile Returns a NetworkFile
-
getUserNetworkFile
Information provided by the PKI file:
\brief Returns the user network file. \remark The user network file is the network file that the user works with during an activity. \return NetworkFile, the user network file.- Specified by:
getUserNetworkFilein interfaceActivityFile- Returns:
- NetworkFile Returns a NetworkFile
-
getVarNetworkFile
Information provided by the PKI file:
\brief Returns the var network file. \return NetworkFile, the var network file.- Specified by:
getVarNetworkFilein interfaceActivityFile- Returns:
- NetworkFile Returns a NetworkFile
-
getCurrentNetworkFile
Information provided by the PKI file:
\brief Returns the current network file in activity wizard, which can be the init, answer, or user network file. \return NetworkFile, the current network file.- Specified by:
getCurrentNetworkFilein interfaceActivityFile- Returns:
- NetworkFile Returns a NetworkFile
-
getHashedPassword
Information provided by the PKI file:
\brief Returns the MD5 hash of the activity password. \return QString, the MD5 hash of the activity password.- Specified by:
getHashedPasswordin interfaceActivityFile- Returns:
- String Returns a String
-
getComponentList
Information provided by the PKI file:
\brief Returns the list of components. \return vector<QString>, the list of components.- Specified by:
getComponentListin interfaceActivityFile- Returns:
- List<String> Returns a List<String>
-
setCountDownTime
public void setCountDownTime(int ms) Information provided by the PKI file:
\brief Sets the countdown time. \param ms, countdown time in milliseconds.- Specified by:
setCountDownTimein interfaceActivityFile- Parameters:
ms- Takes in a parameter of ms
-
getCountDownTime
public int getCountDownTime()Information provided by the PKI file:
\brief Returns the total countdown time in milliseconds. \return int, the total countdown time in milliseconds.- Specified by:
getCountDownTimein interfaceActivityFile- Returns:
- int Returns a int
-
getCountDownTimeLeft
public int getCountDownTimeLeft()Information provided by the PKI file:
\brief Returns the countdown time left in milliseconds. \return int, countdown time left in milliseconds.- Specified by:
getCountDownTimeLeftin interfaceActivityFile- Returns:
- int Returns a int
-
setTimerType
Information provided by the PKI file:
\brief Sets the timer type. \param e, the type of timer. Timer types: ELAPSED = 0, COUNTDOWN = 1, NONE = 2- Specified by:
setTimerTypein interfaceActivityFile- Parameters:
e- Takes in a parameter of e
-
getTimerType
Information provided by the PKI file:
\brief Returns the current timer type. \return TIMER_TYPE, the current timer type. Timer types: ELAPSED = 0, COUNTDOWN = 1, NONE = 2- Specified by:
getTimerTypein interfaceActivityFile- Returns:
- ACTIVITYTIMERTYPE Returns a ACTIVITYTIMERTYPE
-
getDynamicPercentageFeedbackType
Information provided by the PKI file:
\brief Returns the dynamic feedback type. \return DYNAMICTYPE, the dynamic feedback type. Dynamic feedback types: NOFEEDBACK = 0, PERCENTAGEPOINT = 1, PERCENTAGESCORE = 2, POINTS = 3, SCORE = 4- Specified by:
getDynamicPercentageFeedbackTypein interfaceActivityFile- Returns:
- DYNAMICTYPE Returns a DYNAMICTYPE
-
setDynamicPF
public void setDynamicPF(boolean enable) Information provided by the PKI file:
\brief Sets the dynamic feedback to be enabled or disabled. \param enable, true enables dynamic percentage feedback, false disables it.- Specified by:
setDynamicPFin interfaceActivityFile- Parameters:
enable- Takes in a parameter of enable
-
isDynamicPercentageFeedback
public boolean isDynamicPercentageFeedback()Information provided by the PKI file:
\brief Returns the state of the dynamic feedback. \return bool, true if dynamic percentage feedback is enabled, otherwise false.- Specified by:
isDynamicPercentageFeedbackin interfaceActivityFile- Returns:
- boolean Returns a boolean
-
getVariableManager
Information provided by the PKI file:
\brief Returns the Variable Manager. \return VariableManager, the Variable Manager.- Specified by:
getVariableManagerin interfaceActivityFile- Returns:
- VariableManager Returns a VariableManager
-
getDyFeedbackString
Information provided by the PKI file:
\brief Returns the dynamic feedback percentage points, percentage score, points, or score. \return QString, the dynamic feedback if the type is not set to NOFEEDBACK, otherwise an empty string.- Specified by:
getDyFeedbackStringin interfaceActivityFile- Returns:
- String Returns a String
-
getPercentageCompleteScore
public double getPercentageCompleteScore()Information provided by the PKI file:
\brief Returns the percentage complete score. \return double, the percentage complete score.- Specified by:
getPercentageCompleteScorein interfaceActivityFile- Returns:
- double Returns a double
-
isUserProfileLocked
public boolean isUserProfileLocked()Information provided by the PKI file:
\brief Returns whether this activity file is profile locked or not \return bool, true if the user profile is locked and false if not.- Specified by:
isUserProfileLockedin interfaceActivityFile- Returns:
- boolean Returns a boolean
-
setCompletedFeedback
Information provided by the PKI file:
\brief Sets the text shown on activity completion to be the given text. \param str, the text to use for activity completion message.- Specified by:
setCompletedFeedbackin interfaceActivityFile- Parameters:
str- Takes in a parameter of str
-
getCompletedFeedback
Information provided by the PKI file:
\brief Returns the activity completion feedback text. \return QString, the activity completion feedback text.- Specified by:
getCompletedFeedbackin interfaceActivityFile- Returns:
- String Returns a String
-
setInCompleteFeedback
Information provided by the PKI file:
\brief Sets the text shown on activity is not yet completed. \param str, the text to use for activity incomplete message.- Specified by:
setInCompleteFeedbackin interfaceActivityFile- Parameters:
str- Takes in a parameter of str
-
getIncompleteFeedback
Information provided by the PKI file:
\brief Returns the activity incomplete feedback text. \return QString, the activity incomplete completion feedback text.- Specified by:
getIncompleteFeedbackin interfaceActivityFile- Returns:
- String Returns a String
-
getTimeElapsed
public int getTimeElapsed()Information provided by the PKI file:
\brief Returns the activity run time. \return int, how long the activity has been running, in milliseconds.- Specified by:
getTimeElapsedin interfaceActivityFile- Returns:
- int Returns a int
-
setTimeElapsed
public void setTimeElapsed(int ms) Information provided by the PKI file:
\brief Sets the activity current run time. \param ms, runtime time in milliseconds.- Specified by:
setTimeElapsedin interfaceActivityFile- Parameters:
ms- Takes in a parameter of ms
-
getChallengeKeyAsInts
Information provided by the PKI file:
\brief Get the challenge key for the password- Specified by:
getChallengeKeyAsIntsin interfaceActivityFile- Returns:
- List<Integer> Returns a List<Integer>
-
getChallengeKeyAsBase64
Information provided by the PKI file:
\brief Get the challenge key for the password- Specified by:
getChallengeKeyAsBase64in interfaceActivityFile- Returns:
- String Returns a String
-
confirmPassword
Information provided by the PKI file:
\brief Confirm the password, only then will IPC work- Specified by:
confirmPasswordin interfaceActivityFile- Parameters:
hashedPass- Takes in a parameter of hashedPass- Returns:
- boolean Returns a boolean
-
isPasswordConfirmed
public boolean isPasswordConfirmed()Information provided by the PKI file:
\brief Check if password is confirmed- Specified by:
isPasswordConfirmedin interfaceActivityFile- Returns:
- boolean Returns a boolean
-
getCertInfo
- Specified by:
getCertInfoin interfaceActivityFile- Returns:
- String Returns a String
-
isActivityFile
public boolean isActivityFile()Information provided by the PKI file:
\brief Returns whether this file is an activity file or regular network file- Specified by:
isActivityFilein interfaceActivityFile- Specified by:
isActivityFilein interfaceNetworkFile- Overrides:
isActivityFilein classNetworkFileImpl- Returns:
- boolean Returns a boolean
-